package com.chief.source;


import org.apache.flink.streaming.api.functions.source.SourceFunction;

public class CustomerSource implements SourceFunction<TestBean> {


    private boolean running = true;

    @Override
    public void run(SourceContext<TestBean> ctx) throws Exception {
        while (running) {
            ctx.collect(new TestBean("aaa"));
        }
    }

    @Override
    public void cancel() {
        this.running = false;
    }
}
